package com.cqcomponents.components;

import java.util.ArrayList;
import java.util.List;

import com.cqcomponents.annotations.ComponentInjection;
import com.cqcomponents.api.components.IComponent;

public class Navigation extends BaseComponent implements IComponent {

	private List<NavigationItem> items = new ArrayList<NavigationItem>();

	@Override
	public boolean getHasContent() {
		return items.size() > 0;
	}

	@ComponentInjection(rootPathAttribute = "root", primaryType = "cq:Page")
	public void setItems(List<NavigationItem> items) {
		this.items = items;
	}

	public List<NavigationItem> getItems() {
		return items;
	}

}
